<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<html>
<head>
<title>中登RA管理系统</title>
<script type="text/javascript" src="js/jquery-1.5.1.min.js"></script>
<style type="text/css">
	.errInfo{display:none;color:red;font-size: 12px;}
</style>
</head>
<body>
	<form action="login.html" method="post" name="loginForm" onsubmit="return check();">
		<table width="562" height="92" border="0" align="center"
			cellpadding="0" cellspacing="0">
			<tr>
				<td width="562"></td>
			</tr>
		</table>

		<table width="562" height="390" border="0" align="center"
			cellpadding="0" cellspacing="0">
			<tr>
				<td width="99%" valign="top" background="images/login_manager.jpg">
					<table width="80" border="0" cellspacing="0" cellpadding="0"
						height="52">
						<tr>
							<td height="50" align="right"></td>
							<td width="28">
								&nbsp;
							</td>
							<td valign="top">
								<br />
							</td>
						</tr>
					</table>
					<table width="557" border="0" cellspacing="0" cellpadding="0"
						height="52">
						<tr>
							<td height="50">
								&nbsp;
							</td>
						</tr>
					</table>
					<table width="70%" border="0" align="center" cellpadding="0"
						cellspacing="0">
						<tr>
							<td width="20%" height="30" align="right">
								<span>管理员：</span>
							</td>
							<td width="70%">
								<input type="text" name="loginname" id="loginname" class="login_input" value="${loginname }"/>
								<span id="nameerr" class="errInfo"></span>
							</td>	
						</tr>
						<tr>
							<td width="20%" height="30" align="right">
								<span>密 码：</span>
							</td>
							<td width="70%">
								<input type="password" name="password" id="password" class="login_input" value="${password }"/>
								<span id="pwderr" class="errInfo"></span>
							</td>
						</tr>
						<tr><td></td><td>
							<span id="errInfo" class="errInfo"></span><td>
						</tr>
						<tr>
							<td height="45">
								&nbsp;
							</td>
							<td align="left" valign="bottom">
								<input type="image" src="images/login.gif"  style="cursor: pointer"/>
								<img src="images/cansel.gif" width="71" height="23"
									style="cursor: pointer" onClick="document.forms(0).reset();"/>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</form>
	<script type="text/javascript">
	if (window != top) 
        top.location.href = location.href;
	var errInfo = "${errInfo}";
	$(document).ready(function(){
		$("#errInfo").show();
		$("#errInfo").html(errInfo);
		$("#loginname").focus();
	});
	
	function resetErr(){
		$("#errInfo").hide();
		$("#errInfo").html("");
	}
	function check(){
		resetErr();
		if($("#loginname").val()==""){
			$("#errInfo").show();
			$("#errInfo").html("用户名不得为空！");
			$("#loginname").focus();
			return false;
		}
		if($("#password").val()==""){
			$("#errInfo").show();
			$("#errInfo").html("密码不得为空！");
			$("#password").focus();
			return false;
		}
		return true;
	}
	</script>
</body>
</html>
